<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="b">
    <!--内容-->
    <div>
        <!--公告-->
        <div class="layui-col-md12" style="margin-top: 5px">
            <!--条件检索-->
            <div style="margin-top: 2px;margin-right: 5px">
                <blockquote class="layui-elem-quote" style="border-color: red">
                    <strong><i class="layui-icon layui-icon-reply-fill"
                               style="font-size: 16px;color: red">公告</i></strong>
                    <hr class="layui-bg-red">
                    <span style="color: red">本网站为个人项目,仅用于展示</span>
                </blockquote>
            </div>
        </div>
        <!--左边内容-->
        <div class="layui-col-md9" style="margin-top: 5px">
            <!--条件检索-->
            <div style="margin-top: 2px;margin-right: 5px">
                <blockquote class="layui-elem-quote" style="border-color: #1e9fff">
                    <strong><i class="layui-icon layui-icon-search" style="font-size: 16px">条件检索</i></strong>
                    <hr class="layui-bg-blue">
                    <div>
                        <div class="layui-col-md1">
                            <span style="color: #8D8D8D">资源类别:</span>
                        </div>
                        <div class="layui-col-md11">
                            <a href="/" th:style="${articleTypeId==null?'color:red;float: left':'float: left;color:#1e9fff'}">全部</a>
                            <div th:each="articleType:${application.articleTypeList}">
                                <a th:href="@{'/?page=1&articleTypeId='+${articleType.id}}"
                                   th:style="${articleTypeId == ''+articleType.id+''?'margin-left: 6px;color:red;float: left':'margin-left: 6px;float: left;color:#1e9fff'}"
                                   th:text="${articleType.name}"></a>
                            </div>
                        </div>
                        <hr style="background-color: #f2f2f2">
                        <div style="margin-top: 10px">
                            <div class="layui-col-md1">
                                <span style="color: #8D8D8D">关键词:</span>
                            </div>
                                <div class="layui-col-md9">
                                    <input type="text" id="q" name="q" lay-verify="title" autocomplete="off"
                                           placeholder="请输入关键词"
                                           class="layui-input">
                                </div>
                                <div class="layui-col-md2">
                                    <button type="button" class="layui-btn layui-btn-normal" lay-submit=""
                                            lay-filter="demo1" onclick="searchQ()"
                                            style="margin-left: 4px">检索
                                    </button>
                                </div>
                        </div>
                        <hr style="background-color: #f2f2f2">
                    </div>
                </blockquote>
            </div>
            <!--检索结果-->
            <div style="margin-top: 2px;margin-right: 5px">
                <blockquote class="layui-elem-quote" style="border-color: #1e9fff">
                    <strong><i class="layui-icon layui-icon-template-1" style="font-size: 16px">搜索结果</i></strong><span style="float: right">(关于<span style="color: red" th:text="${q}"></span>的资源,共有 <span style="color: red" th:text="${resultTotal}"></span> 个)</span></span>
                    <hr class="layui-bg-blue">
                    <div th:each="article:${articleList}">
                        <a th:href="'/article/'+${article.getId()}" style="text-decoration: none;color: #1e9fff"><h3
                                th:utext="${article.name}"></h3></a>
                        <p style="color: grey;margin-top: 10px">上传者:<span th:text="${article.user.nickName}"></span>&nbsp;&nbsp;上传时间:<span th:text="${#dates.format(article.publishDate,'yyyy-MM-dd')}"></span>&nbsp;&nbsp;类别:<span th:text="${article.articleType.name}"></span>&nbsp;&nbsp;所需积分:<span th:text="${article.points}"></span></p>
                        <p style="margin-top: 10px" th:utext="${article.content}"></p>
                        <a th:href="@{'/article/'+${article.id}}" class="layui-btn layui-btn-sm" style="margin-top: 5px">查看详情</a>
                        <hr style="color: grey">
                    </div>
                    <p style="text-align: center">
                        <font th:utext="${pageCode}"></font>
                    </p>
                </blockquote>
            </div>
        </div>
        <!--右边内容-->
        <div class="layui-col-md3" style="margin-top: 7px">
            <blockquote class="layui-elem-quote" style="border-color: #1e9fff">
                <strong><i class="layui-icon layui-icon-fire" style="font-size: 16px">热门资源</i></strong>
                <hr class="layui-bg-blue">
                <div th:each="articleHot:${application.articleListHot}">
                    <p><a style="color: #1e9fff" th:href="@{'/article/'+${articleHot.id}}" th:text="${#strings.abbreviate(articleHot.name,20)}"
                          th:title="${articleHot.name}"></a></p>
                </div>
            </blockquote>
        </div>
        <!--友情链接-->
        <div class="layui-col-md12">
            <blockquote class="layui-elem-quote" style="border-color: #1e9fff">
                <strong><i class="layui-icon layui-icon-link" style="font-size: 16px">友情链接</i></strong>
                <hr class="layui-bg-blue">
                <div th:each="link:${application.linkList}">
                    <a th:href="${link.url}" th:text="${link.name+'&nbsp;&nbsp;'}" style="float: left;color: #1e9fff"></a>
                </div>
                <span style="color: #f2f2f2">1</span>
            </blockquote>
        </div>
    </div>
</div>
</body>
</html>